#pragma once

#include<stdio.h>

typedef char BTDataType;
typedef struct BinaryTreeNode
{
	struct BinaryTreeNode* left;
	struct BinaryTreeNode* right;
	BTDataType data;
} BTNode;

void PreOrder(BTNode* root);
void InOrder(BTNode* root);
void postOrder(BTNode* root);
void BreadthFirstOrder(BTNode* root);

int TreeSize(BTNode* root);
int TreeLeavesSize(BTNode* root);
int TreeKLayerSize(BTNode* root, int k);

BTNode* TreeFind(BTNode* root, BTDataType x);

BTNode* CreateBTNode(BTDataType x);
void BinaryTreeDestroy(BTNode* root);

int BinaryTreeComplete(BTNode* root);